<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>SameReport - 论文检测报告</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="htmls/css/index.css">
    <link rel="stylesheet" href="images/index.css">
</head>
<body style="overflow: hidden;margin:0; padding:0;">
<div class="container">
    <div class="top" style="display: none" id="top">
        <div id="top_left"><img src="images/logo.png"></div>
        <div id="top_con">
            <span id="title"></span>
            <li id="author-time"></li>
            <li id="report-number"><a href="" target="_blank" id="report-link">查询真伪</a></li>
        </div>
        <div id="top_rig">
            <li id="chars_sum"></li>
            <li id="paragraphs_sum"></li>
            <li id="sentences_sum"></li>
        </div>
        <div class="clear"></div>
    </div>
    <div class="header">
        <div class="header logo" id="header-logo">
            <span>SameReport</span>
            <span class="mobile-tips">(使用电脑可查看完整报告)</span>
        </div>
        <div class="header item">
            <ul class="layui-nav layui-bg-green" lay-filter="header-nav">
                <li class="layui-nav-item"><a href="htmls/detailreport.html" target='ViewMain-PC'>详细报告</a></li>
                <li class="layui-nav-item"><a href="htmls/count.html" target='ViewMain-PC'>综合评估</a></li>
                <li class="layui-nav-item"><a href="htmls/edit_paper.html" target='ViewMain-PC'>修改对照</a></li>
                <li class="layui-nav-item"><a href="简明打印版.pdf" target='ViewMain-PC'>简明打印版</a></li>
                <li class="layui-nav-item"><a href="htmls/help.html" target='ViewMain-PC'>使用帮助</a></li>
            </ul>
        </div>
        <div class="header item-mobile">
            <ul class="layui-nav layui-bg-green" lay-filter="header-nav">
                <li class="layui-nav-item"><a href="htmls/detailreport-mobile.html" target='ViewMain-Mobile'>详细报告</a></li>
                <li class="layui-nav-item"><a href="htmls/pdf-mobile.html" target='ViewMain-Mobile'>简明报告</a></li>
            </ul>
        </div>
        <div class="header right hooks" onclick="showDetail()" id="pulldown">
            <img style="width: 20px;height: 20px;" src="htmls/images/pulldown.png">
        </div>
        <div class="header right hooks" id="pullup" onclick="hideDetail()" style="display: none">
            <img style="width: 16px;height: 16px;" src="htmls/images/pullup.png">
        </div>
        <div class="header right">
            <div class="header right rate">
                <span id="rate" style="color: #ff2900;font-weight: bold"></span>
                <span>相似度：</span>
            </div>
            <div class="header right check" onclick="checkNumber()">
                查询真伪
            </div>
        </div>
        <div class="header menu">
            <i class="layui-icon layui-icon-app mobile-icon"></i>
        </div>
    </div>

    <div class="content">
        <iframe width="100%" src="htmls/detailreport.html" align="center" height="1000px" name="ViewMain-PC" id="ViewMain-PC"
                scrolling="yes"></iframe>
    </div>

    <div class="content-mobile">
        <iframe width="100%" src="htmls/detailreport-mobile.html" align="center" height="1000px" name="ViewMain-Mobile" id="ViewMain-Mobile"
                scrolling="yes"></iframe>
    </div>


</div>
<script src="htmls/js/data.js"></script>
<script src="layui/layui.js"></script>
<script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.use('element', function () {
        var element = layui.element;
        element.on('nav(header-nav)', function (data) {
            console.log(data)
        });
    })
    $(".mobile-icon").click(function () {
        $(".header.item-mobile").toggleClass('layui-show');
    });
</script>
<script>
    function SetWinHeight(obj) {
        var win = obj;
        if (document.getElementById) {
            if (win && !window.opera) {
                if (win.contentDocument && win.contentDocument.body.offsetHeight) {
                    if (win.contentDocument.body.offsetHeight < 1000) {
                        win.height = 1000;//设置最小高度
                    } else {
                        win.height = win.contentDocument.body.offsetHeight;
                    }
                } else if (win.Document && win.Document.body.scrollHeight)
                    win.height = win.Document.body.scrollHeight;
            }
        }
    }
</script>
<script>
    function IEVersion() {
        var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
        var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
        var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
        var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
        if(isIE) {
            alert("该报告部分功能不支持ie浏览器，建议更换其他高版本浏览器")
        } else if(isEdge) {
            alert("该报告部分功能不支持edge，建议更换其他高版本浏览器")
        } else if(isIE11) {
            alert("该报告部分功能不支持edge，建议更换其他高版本浏览器") //IE11
        }else{
            return -1;//不是ie浏览器
        }
    }

    function showDetail() {
        document.getElementById('top').style.removeProperty('display')
        document.getElementById('pulldown').style.display = 'none'
        document.getElementById('header-logo').style.display = 'none'
        document.getElementById('pullup').style.display = 'block'
    }

    function hideDetail() {
        document.getElementById('top').style.display = 'none'
        document.getElementById('pulldown').style.display = 'block'
        document.getElementById('header-logo').style.removeProperty('display')
        document.getElementById('pullup').style.display = 'none'
    }

    function topinfo() {
        a_dom = document.createElement('a');
        a_dom.href='http://www.SameReport.com/yz.html?number='+base_info.captcha;
        a_dom.innerText='  查询真伪'
        document.getElementById('title').innerText = base_info.title;
        document.getElementById('author-time').innerText = '作者：'+base_info.author+'       '+base_info.submit_time;
        document.getElementById('report-number').innerText ='报告防伪编码：'+base_info.captcha;
        document.getElementById('report-number').appendChild(a_dom)
        document.getElementById('chars_sum').innerText = '论文字数：'+base_info.char_sum;
        document.getElementById('paragraphs_sum').innerText = '段落个数：'+base_info.paragraphs;
        document.getElementById('sentences_sum').innerText = '句子个数：'+base_info.sentence_sum;
        document.getElementById('rate').innerText=base_info.except_author_rate+'%';
    }

    function checkNumber(){
        window.location.href='http://www.SameReport.com/yz.html?number='+base_info.captcha;
    }
    IEVersion()
    topinfo()
</script>
</body>
</html>